testgtk: fix css
authorTimm Bäder <mail@baedert.org>
Mon, 3 Oct 2016 07:31:44 +0000 (09:31 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 16 Oct 2016 16:17:21 +0000 (18:17 +0200)
tests/testgtk.c
tests/testgtk.css
tests/testgtk2.css

index dc878ad028179ae164ceed1542efee82c2a152d7..4155cfb8899dc429f3cae9b4f6e9e6c75cc1ff9f 100644 (file)
@@ -9443,7 +9443,8 @@ main (int argc, char *argv[])
   gtk_css_provider_load_from_data (memory_provider,
                                    "#testgtk-version-label {\n"
                                    "  color: #f00;\n"
-                                   "  font: Sans 18;\n"
+                                   "  font-family: Sans;\n"
+                                   "  font-size: 18px;\n"
                                    "}",
                                    -1, NULL);
   gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (memory_provider),
index f5e8694f12704c68095ecb7139ac1d5163b194a3..3c5002ff05b099efdd6ba30f5835b4836c9a888d 100644 (file)
@@ -7,9 +7,6 @@
 }
 
 * {
-    -GtkButton-child-displacement-x: 1;
-    -GtkButton-child-displacement-y: 1;
-
     -GtkToolbar-space-size: 10;
     -GtkToolbar-space-style: line;
     -GtkToolbar-button-relief: none;
     -GtkArrow-arrow-scaling: 1.0;
     -GtkEntry-invisible-char: 10046;
 
-    font: Sans 12;
+    font-family: Sans;
+    font-size: 12px;
 
     -Gtest-foo: 47;
     -Gtest-bar: 47;
 }
 
-GtkLabel:selected {
+label:selected {
     background-color: gray;
 }
 
-GtkLabel:prelight {
+label:hover {
     background-color: mix (#a0a0a0, rgb (75%, 200, 0%), 0.9);
 }
 
 /* override testgtk2, introduce the green color in the button list */
-#main_window GtkScrolledWindow GtkButton:prelight {
+#main_window scrolledwindow button:hover {
     background-color: rgb (0%, 75%, 0);
 }
 
-GtkEntry {
-    gtk-key-bindings: entry-bindings;
+entry {
+    -gtk-key-bindings: entry-bindings;
 }
index a51ec2a10091095e261616d3e067045b0bc6518d..49e6c093e166581c4e43aefb84e6e4abd1bdb15b 100644 (file)
@@ -1,9 +1,10 @@
 /* this file gets included from testgtk.css */
 
-#main_window GtkButton {
-    font: Monospace 10;
+#main_window button {
+    font-family: Monospace;
+    font-size: 10px;
 }
 
-#main_window GtkButton:hover {
+#main_window button:hover {
     background-color: rgba(0%, 0%, 75%, 0.1);
 }